import axios from 'axios';

// 添加奶牛
const postAddCow = form => axios.post('/df/v1/cow', form).then(res => res.data);

// 添加奶牛操作
const postAddCowOperate = form => axios.post('/df/v1/cow/operate', form).then(res => res.data);

// 添加奶牛挤奶
const postAddCowMilking = form => axios.post('/df/v1/cow/milking', form).then(res => res.data);

// 获取奶牛场的奶牛编号
const get = id => axios.get(`/df/v1/get/${id}`).then(res => res.data);

// 发送到加工厂
const postSentProcess = form => axios.post('/df/v1/sentProcess', form).then(res => res.data);

export {
    postAddCow,
    postAddCowOperate,
    postAddCowMilking,
    get,
    postSentProcess,
}
